#ifndef NETWORKPLUGIN_H
#define NETWORKPLUGIN_H
#include <QWidget>
#include <string>
#include <QMessageBox>
#include <QTimer>
#include "State.h"
#include "GetMsgThread.h"

class Contact;
class State;
class GetMsgThread;
class ContactsList;
class GetMsgThread;
class NetworkPlugin: public QWidget
{
    Q_OBJECT

    public:
        NetworkPlugin();
        virtual ~NetworkPlugin();
        QString getPluginName();
        void setLoginAndPassword(std::string _login, std::string _password);
        void getConection();
        void addContact(Contact *contact);
        virtual void sendMsg(std::string id, std::string text);
        virtual void setNote(QString text);

    public slots:
        virtual void connectWithNetwork();
        virtual void getMsg();

    protected:
        std::string pluginName;
        std::string login;
        std::string password;
        QList<State> statesList;
        QList<Contact*> contactList;
        QTimer *timer;
        GetMsgThread getMsgThread;
};

#endif // NETWORKPLUGIN_H
